<?php
	function MyCounter(){
		$counterFile="counter.txt";
		$fp=fopen($counterFile,"ab+");
		stream_set_timeout($fp, 30);
		$num = fgets($fp);
		$num += 1;
		fclose($fp);
		$fp=fopen($counterFile,"wb");
		fwrite($fp,$num);
		print "<font color=red>$num</font>";
		fclose($fp);
	}
	echo("第");
	print mycounter();
	echo("位访客");
?>
